//
//  AddButtonPullDownView.m
//  SouthChina
//
//  Created by Mr.Y on 14/12/25.
//  Copyright (c) 2014年 科创. All rights reserved.
//

#import "AddButtonPullDownView.h"
#import "FeedbackViewController.h"
#import "AddFriendViewController.h"
@implementation AddButtonPullDownView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        NSArray * arr = @[@"创建群",@"创建讨论组",@"添加联系人",@"扫一扫",@"意见反馈"];
        for (int i = 0; i<5; i++) {
            UIButton * btn = [[UIButton alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-120, TITLE_BAR_HEGIHT+(YNEW)+i*40, 120, 40)];
           // [btn setBackgroundColor:[UIColor orangeColor]];
            btn.tag = i;
            [btn setTitle:[arr objectAtIndex:i] forState:UIControlStateNormal];
            [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
            //[UIColor colorWithRed:0.000 green:0.435 blue:0.733 alpha:1]
            [btn setBackgroundColor:[UIColor grayColor]];
            [btn setBackgroundImage:[UIImage imageNamed:@"messagehead2"] forState:UIControlStateNormal];
            [btn addTarget:self action:@selector(chooseBtn:) forControlEvents:UIControlEventTouchUpInside];
            [self addSubview:btn];
            UIImageView * lineImage = [[UIImageView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-120, TITLE_BAR_HEGIHT+(YNEW)+(i+1)*40-1, 120, 1)];
            [lineImage setBackgroundColor:[UIColor whiteColor]];
            [self addSubview:lineImage];
        }
    }
    return self;
}
- (void)chooseBtn:(UIButton*)btn
{
    [self.delegate chooseBtn:btn];

}
@end
